//
//  CommonCollectionHeaderView.m
//  CheTuoTuo
//
//  Created by Houge on 2021/1/21.
//

#import "CommonCollectionHeaderView.h"

@interface CommonCollectionHeaderView ()
@property (strong, nonatomic) UILabel *titleLabel;
@end

@implementation CommonCollectionHeaderView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self addSubview:self.titleLabel];
    }
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    self.titleLabel.frame = CGRectMake(15, 0, self.width - 30, self.height);
}

- (void)setTitle:(NSString *)title {
    _title = title;
    
    self.titleLabel.text = title;
}

- (UILabel *)titleLabel {
    if (!_titleLabel) {
        _titleLabel = [UILabel labelWithName:@"标题" Font:[UIFont systemFontOfSize:14.0] textColor:TEXT_LIGHT_BLACK_COLOR textAlignment:NSTextAlignmentLeft];
        
    }
    return _titleLabel;
}

@end
